<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>   
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>위험수준산정및평가정보</title>
<link href="reset.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!--말 줄임 css(모든 브라우저 적용)-->
<style type="text/css">
.ellipsis{
	white-space:nowrap;
	text-overflow:ellipsis;		/* IE, Safari */
	-o-text-overflow:ellipsis;		/* Opera under 10.7 */
	overflow:hidden;			/* "overflow" value must be different from "visible" */ 
	-moz-binding: url('ellipsis.xml#ellipsis');
}
</style>


<script type="text/javascript">
function winClose(){
	window.close();
}
</script>
</head>
<body>
<c:if test="${sessionScope.USER_ID==null}">
		<script type="text/javascript">
			alert("연결이 끊어졌습니다. 다시 로그인 해주시기 바랍니다");
			window.close();
		</script>	
</c:if>
<div class="box">
	<h4 class="white">위험수준 산정 및 평가점수<span class="yellow"> | 위험명 : ${requestScope.calvo.risk_id } | </span><span class="yellow ellipsis" style="width:400px; position: fixed;"> 위험정의 : ${requestScope.vo.risk_nm }</span></h4>
        <div class="box-container1"> 
	<%-- 위험수준 산정 및 평가 시작 --%>
	   		<table class="insertTable" style="width: 740px; margin: 0 auto;">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-right"><a href="#" class="button" onclick="javascript: winClose()"><span>닫기</span></a></div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
	   		<table class="mr1Table" style="width: 740px;table-layout: fixed;  margin: 0 auto;">
		   		<colgroup>
		   			<col width="20px"/>
	   				<col width="120px"/>
	   				<col/>
	   				<col/>
	   				<col/>
		   		</colgroup>
	   			<tbody>
	   				<tr>
	   					<th rowspan="4" class="bRLine">위<br/>험</th>
	   					<th height="20px" class="bBLine bRLine">사업영향도</th>
	   					<th>연관CIA</th>
	   					<td class="col-alignCenter">
		   					<c:choose>
		   						<c:when test="${requestScope.vo.tl_result==1 }">
		   							기밀성
		   						</c:when>
		   						<c:when test="${requestScope.vo.tl_result==2 }">
		   							무결성
		   						</c:when>
		   						<c:when test="${requestScope.vo.tl_result==3 }">
		   							가용성
		   						</c:when>
		   						<c:otherwise>
		   						</c:otherwise>
	   						</c:choose>
	   					</td>
	   					<td class="col-alignCenter">
	   						<c:choose>
		   						<c:when test="${requestScope.vo.tl_result==1 }">
		   							${mraassetvo.c_score }
		   						</c:when>
		   						<c:when test="${requestScope.vo.tl_result==2 }">
		   							${mraassetvo.i_score }
		   						</c:when>
		   						<c:when test="${requestScope.vo.tl_result==3 }">
		   							${mraassetvo.a_score }
		   						</c:when>
		   						<c:when test="${requestScope.vo.tl_result=='0' || requestScope.vo.tl_result==null}">
		   							0
		   						</c:when> 
		   						<c:otherwise>
		   						</c:otherwise>
	   						</c:choose>
	   					</td>
	   				</tr>
	   				<tr>
	   					<th height="20px" class="bBLine">자산 취약성 등급</th>
	   					<td colspan="3" class="col-alignCenter">
	   					<%--
	   					<c:forEach var="mvsclist" items="${requestScope.mvsclist}" varStatus="status">
	   						<span><input type="radio" name="v_score" id="v_score${status.index+1 }" value="${status.index+1 }" disabled="disabled" <c:if test="${requestScope.calvo1.v_score==mvsclist.v_level }">checked='checked'</c:if> /> <label for="v_score${status.index+1 }" style="cursor:pointer">${mvsclist.v_level }(${status.index+1 })</label></span>
	   					</c:forEach>
	   					 --%>
	   					 <c:forEach var="vlList" items="${requestScope.vlList}" varStatus="status">
	   						<span><input type="radio" name="v_score" id="v_score${status.index+1 }" value="<fmt:formatNumber value="${vlList.base_cnt }" pattern="0"/>" disabled="disabled" <c:if test="${requestScope.calvo.v_score==vlList.base_cnt }">checked='checked'</c:if> /> <label for="v_score${status.index+1 }" style="cursor:pointer">${vlList.base_lev2 }(<fmt:formatNumber value="${vlList.base_cnt }" pattern="0"/>)</label></span>
	   					</c:forEach>
	   					<%--
	   						<span><input type="radio" name="v_score" id="v_score4" value="4" disabled="disabled" <c:if test="${requestScope.calvo.v_score==4 }">checked='checked'</c:if> /> <label for="v_score4" style="cursor:pointer">매우취약(4)</label></span>
							<span><input type="radio" name="v_score" id="v_score3" value="3" disabled="disabled" <c:if test="${requestScope.calvo.v_score==3 }">checked='checked'</c:if> /> <label for="v_score3" style="cursor:pointer">취약(3)</label></span>
							<span><input type="radio" name="v_score" id="v_score2" value="2" disabled="disabled" <c:if test="${requestScope.calvo.v_score==2 }">checked='checked'</c:if> /> <label for="v_score2" style="cursor:pointer">일부취약(2)</label></span>
							<span><input type="radio" name="v_score" id="v_score1" value="1" disabled="disabled" <c:if test="${requestScope.calvo.v_score==1 }">checked='checked'</c:if> /> <label for="v_score1" style="cursor:pointer">양호(1)</label></span>
						 --%>
	   					</td>
	   				</tr>
	   				<tr>
	   					<th  height="20px" class="bBLine">위험발생가능성</th>
	   					<td colspan="3" class="col-alignCenter">
	   					 <c:forEach var="rbList" items="${requestScope.rbList}" varStatus="status">
	   						<span><input type="radio" name="riskb_poss" id="riskb_poss${status.index+1 }" value="<fmt:formatNumber value="${rbList.base_cnt }" pattern="0"/>"   disabled="disabled" <c:if test="${requestScope.calvo.riskb_poss==rbList.base_cnt }">checked='checked'</c:if> /> <label for="riskb_poss${status.index+1 }" style="cursor:pointer">${rbList.base_lev2 }(<fmt:formatNumber value="${rbList.base_cnt }" pattern="0"/>)</label></span>
	   					</c:forEach>
	   					<%--
	   						<span><input type="radio" name="riskb_poss" id="riskb_poss1" value="1" <c:if test="${requestScope.calvo.riskb_poss==1 }">checked='checked'</c:if> /> <label for="riskb_poss1" style="cursor:pointer">매우낮음(1)</label></span>
							<span><input type="radio" name="riskb_poss" id="riskb_poss2" value="2" <c:if test="${requestScope.calvo.riskb_poss==2 }">checked='checked'</c:if> /> <label for="riskb_poss2" style="cursor:pointer">낮음(2)</label></span>
							<span><input type="radio" name="riskb_poss" id="riskb_poss3" value="3" <c:if test="${requestScope.calvo.riskb_poss==3 }">checked='checked'</c:if> /> <label for="riskb_poss3" style="cursor:pointer">중간(3)</label></span>
							<span><input type="radio" name="riskb_poss" id="riskb_poss4" value="4" <c:if test="${requestScope.calvo.riskb_poss==4 }">checked='checked'</c:if> /> <label for="riskb_poss4" style="cursor:pointer">높음(4)</label></span>
							<span><input type="radio" name="riskb_poss" id="riskb_poss5" value="5" <c:if test="${requestScope.calvo.riskb_poss==5 }">checked='checked'</c:if> /> <label for="riskb_poss5" style="cursor:pointer">매우높음(5)</label></span>
						 --%>
	   					</td>
	   				</tr>
	   				<tr>
	   					<th height="22px">위험수준</th>
	   					<td colspan="3" class="col-alignCenter  col-rowspanMid">
	   						<%--
	   						<span id="calculDiv" style="display:none">
	   							<span id="syscore"></span> &times; <span id="vscore"></span> &times; <span id="riskbposs"></span> = <span id="riskdegree"></span> (max ${requestScope.rvatotal }), ${requestScope.chRvatotal }점 척도 환산점수 <span id="exChangeRD"></span> 점
	   						</span>
	   						 --%>
	   							<span id="syscore"><c:if test="${calvo.sy_score==null }">0</c:if>${calvo.sy_score }</span> 
	   							&times; <span id="vscore"><c:if test="${calvo.v_score==null }">0</c:if>${calvo.v_score }</span>
	   							 &times; <span id="riskbposs"> <c:if test="${calvo.riskb_poss==null }">0</c:if>${calvo.riskb_poss }</span>
	   							  = <span id="riskdegree" class="red"><c:if test="${calvo.risk_degree==null }">0</c:if>${calvo.risk_degree }</span>
	   							   (max <c:if test="${requestScope.rvatotal==null }">0</c:if>${requestScope.rvatotal }), 
	   							   <c:if test="${requestScope.chRvatotal==null }">0</c:if>${requestScope.chRvatotal }점 척도 환산점수 <span id="exChangeRD"><fmt:formatNumber value="${calvo.risk_degree*1.67 }" pattern="0"/></span> 점
	   							
	   							
	   					</td>
	   				</tr>
	   				<tr>
	   					<td colspan="5" style="border: 0px #fff;"></td>
	   				</tr>
	   			</tbody>
	   		</table>
	   		<table class="mr2Table" style="width: 740px;table-layout: fixed;  margin: 0 auto;">
		   		<colgroup>
		   			<col width="80px"/>
	   				<col width="120px"/>
	   				<col/>
		   		</colgroup>
		   		<tbody>
		   			<tr>
		   				<th rowspan="2" class="bRLine">위험수준평가</th>
		   				<th height="20px" class="bBLine">위험등급</th>
		   				<td class="col-alignCenter">
		   					<span><input type="radio" name="risk_degrade" id="risk_degrade1" value="1" disabled="disabled" <c:if test="${requestScope.calvo.risk_degrade==1 }">checked='checked'</c:if> /> <label for="risk_degrade1" style="cursor:pointer">A등급 (높은 위험)</label></span>
							<span><input type="radio" name="risk_degrade" id="risk_degrade2" value="2" disabled="disabled" <c:if test="${requestScope.calvo.risk_degrade==2 }">checked='checked'</c:if> /> <label for="risk_degrade2" style="cursor:pointer">B등급 (중간 위험)</label></span>
							<span><input type="radio" name="risk_degrade" id="risk_degrade3" value="3" disabled="disabled" <c:if test="${requestScope.calvo.risk_degrade==3 }">checked='checked'</c:if> /> <label for="risk_degrade3" style="cursor:pointer">C등급 (낮음 위험)</label></span>
		   				</td>
		   			</tr>
		   			<tr>
		   				<th height="20px">위험처리긴급도</th>
		   				<td class="col-alignCenter">
		   					<span><input type="radio" name="risk_imm" id="risk_imm1" value="1"  disabled="disabled" <c:if test="${requestScope.calvo.risk_imm==1 }">checked='checked'</c:if> /> <label for="risk_imm1" style="cursor:pointer">1순위(즉시 처리)</label></span>
							<span><input type="radio" name="risk_imm" id="risk_imm2" value="2" disabled="disabled" <c:if test="${requestScope.calvo.risk_imm==2 }">checked='checked'</c:if> /> <label for="risk_imm2" style="cursor:pointer">2순위(6개월 이내 처리)</label></span>
							<span><input type="radio" name="risk_imm" id="risk_imm3" value="3" disabled="disabled" <c:if test="${requestScope.calvo.risk_imm==3 }">checked='checked'</c:if> /> <label for="risk_imm3" style="cursor:pointer">3순위(1년 이내 처리)</label></span>
		   				</td>
		   			</tr>
		   			<tr>
	   					<td colspan="3" style="border: 0px #fff;"></td>
	   				</tr>
		   		</tbody>
		   	</table>
		   	<%-- 위험수준 산정 및 평가 끝 --%>



  		</div><!-- end of div.box-container1 -->
</div> <!-- end of div.box -->
</body>
</html>